-
Notifications
You must be signed in to change notification settings - Fork 29
refact(API): Validates empty user ID as valid. #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Optimizely/ProjectConfig.php
Outdated
| if (strlen($userId) == 0) { | ||
| $this->_logger->log(Logger::DEBUG, 'User ID is invalid'); | ||
| // check for empty string user ID | ||
| if (!is_string($userId)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we are not using validateInputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msohailhussain Addressed.
mikeproeng37
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
src/Optimizely/Optimizely.php
Outdated
| self::USER_ID => $userId | ||
| ] | ||
| ) | ||
| ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This indentation seems weird to me. Perhaps we can collapse this into the previous line so we'll have )) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
src/Optimizely/Optimizely.php
Outdated
| self::USER_ID => $userId | ||
| ] | ||
| ) | ||
| ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here!
Summary